package com.example.minefieldkeepercloud.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.example.minefieldkeepercloud.R;
import com.example.minefieldkeepercloud.bean.TmdBean;
import com.king.base.adapter.ViewHolderAdapter;
import com.king.base.adapter.holder.ViewHolder;

import java.util.List;

public class MDapter extends ViewHolderAdapter<TmdBean> {
    private Context context;

    public MDapter(Context context, List<TmdBean> listData) {
        super(context, listData);
        this.context = context;
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, TmdBean string, int position) {
        return inflate(R.layout.adapter_md);
    }

    @Override
    public void bindViewDatas(ViewHolder holder, TmdBean bean, final int position) {

        holder.setText(R.id.tv_title,bean.getTitle());
        holder.setText(R.id.tv_Content,bean.getContent());
       // TextView tv=holder.getView(R.id.tv_Content);
//        if(bean.getTitle().equals("报错时间"))
//        {
//            try {
//                tv.setText(TimeUtil.dealDateFormat(bean.getContent()));
//            } catch (ParseException e) {
//                e.printStackTrace();
//            }
//        }
//        else
//        {
//            tv.setText(bean.getContent());
//        }
//
//        tv.setTextColor(bean.getKind()==1? Color.parseColor("#00B9A7"):Color.parseColor("#989898"));


    }
}
